Skip to content

fix: preserve undefined in deep accessor types#6239

Open
cyphercodes wants to merge 1 commit intoTanStack:mainfrom
cyphercodes:feat-6238-optional-deep-value
Open

fix: preserve undefined in deep accessor types#6239
cyphercodes wants to merge 1 commit intoTanStack:mainfrom
cyphercodes:feat-6238-optional-deep-value

Conversation

@cyphercodes
Copy link
Copy Markdown

🎯 Changes

Fixes #6238 by preserving undefined in DeepValue when a deep string accessor traverses an optional parent key. This keeps row.getValue() typed as number | undefined for paths like user.salary.amount when salary is optional.

Added a table-core type regression test for the optional deep accessor case.

✅ Checklist

  • I have followed the steps in the Contributing guide.
  • I have tested this code locally with pnpm test:pr.

Targeted checks run locally:

  • pnpm --filter @tanstack/table-core test:types
  • pnpm --filter @tanstack/table-core build
  • pnpm --filter @tanstack/table-core test:lib
  • pnpm exec prettier --check packages/table-core/src/utils.ts packages/table-core/tests/columnHelper.test-d.ts packages/table-core/tsconfig.test-d.json packages/table-core/package.json .changeset/quiet-bears-protect.md
  • git diff --check

🚀 Release Impact

  • This change affects published code, and I have generated a changeset.
  • This change is docs/CI/dev-only (no release).

@coderabbitai
Copy link
Copy Markdown
Contributor

coderabbitai Bot commented Apr 28, 2026

Important

Review skipped

Auto reviews are disabled on base/target branches other than the default branch.

Please check the settings in the CodeRabbit UI or the .coderabbit.yaml file in this repository. To trigger a single review, invoke the @coderabbitai review command.

⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro

Run ID: 949d9bd0-3b71-4f5d-90a2-d80762660370

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

Use the checkbox below for a quick retry:

  • 🔍 Trigger review
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant